﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Campus.Main.Basic.InsertValues
{
    public partial class Fakulty : Default
    {
        public Fakulty():base()
        {
            InitializeComponent();
            button2.Click += base.button2_Click;
        }
        public Fakulty(List<string> arrayList):base(arrayList)
        {
            InitializeComponent();
            id = arrayList[0];
            textBox1.Text = arrayList[1];
            
        }


        protected override void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length>0)
            {
                aToDb.UpdateTable("fakulty","description",textBox1.Text,id);
                Close();
            }
            else
            {
                textBox1.Clear();
                MessageBox.Show("Талааны толтургула!!!");
            }
        }

    }
}
